﻿@using Supermodel.MVC.Extensions

@model Domain.UserFormModel

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h1>User</h1>
@using (Html.BeginForm())
{
    if (Model.Id == 0) 
    {
        @Html.HttpMethodOverride(HttpVerbs.Put)
    }
    @Html.FormModelEditorForModel()
    <input type='submit' value='Save' />
    @Html.ActionLink("Back", "List")
}

@if (Model.Id != 0)
{
    @Html.RESTfulActionLink(HttpVerbs.Post, "Disable", null, "Disable", new { id = Model.Id }, "Are you sure?")
}